package main.java.common.constants;

public enum PayWay {
	PC("PC,平板",(short)1), MOBILE("手机",(short)2);
	
	private String name;
	private Short code;
	
	private PayWay(String name, Short code) {
		this.name = name;
		this.code = code; 
	}
	
	public static String getName(Short code ,String name) {
		for(PayWay p : PayWay.values()) {
			if(p.getCode() == code) {
				return p.getName();
			}
		}
		return null;
	} 
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Short getCode() {
		return code;
	}

	public void setCode(Short code) {
		this.code = code;
	}
	
	
}
